package com.gap.sex;

import com.buanalintas.framework.Dictionary;
import com.gap.entities.GapMasterSex;
import com.buanalintas.framework.Field;
import com.buanalintas.framework.Page;

/**
 *
 * Class Sex is ...
 *
 * Generated on Wed Jan 07 10:52:06 ICT 2015
 *
 * @version 1.0
 * @author  Mr. Kazao™
 * @since   Bynga 1.0
 *
 */
public class Sex extends Page {

    
    private Field sexId;
    
    private Field sexName;
    
    private Field sexDescription;
    

    public Sex() {
        super();

        setTheClass(GapMasterSex.class);
        
        
        
        
        sexId = new Field();
        sexId.setName("sexId");
        sexId.setCaption("id");
        //sexId.setInfo("sex id");
        sexId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        sexId.setInputProperties(" size=\"20\"");        
        getFields().add(sexId);
        
        sexName = new Field();
        sexName.setName("sexName");
        sexName.setCaption("name");
        sexName.setRequired(true);
        sexName.setListProperties(" align=\"left\" width=\"40%\" nowrap");
        sexName.setInputProperties(" size=\"20\"");        
        getFields().add(sexName);
        
        sexDescription = new Field();
        sexDescription.setName("sexDescription");
        sexDescription.setCaption(" description");
        //sexDescription.setInfo("sex description");
        sexDescription.setListProperties(" align=\"left\" width=\"60%\" nowrap");
        sexDescription.setInputProperties(" size=\"20\"");        
        getFields().add(sexDescription);
        

        fillFields();
        getFieldsAdd().remove(sexId);
        getFieldsEdit().remove(sexId);
        getFieldsList().remove(sexId);
        setExportList(getClass().getResourceAsStream("SexList.jasper"));
        setExport(getClass().getResourceAsStream("Sex.jasper"));
    }
    
    @Override
    public void beforeExport() {
        getExportParams().put("title", Dictionary.getValue(this, "Sex"));
    }

    @Override
    public void beforeExportMulti() {
        beforeExport();
    }
}
